package org.dentalcard.ui.api.tools;

import javax.swing.*;
import java.awt.*;

/**
 * @user: Vladimir Chernishov
 * @date: 21.12.11
 * @time: 11:00
 */
public abstract class DecDialog extends JDialog {

    protected DecDialog(Frame owner) {
        super(owner);
    }

    protected DecDialog(Frame owner, boolean modal) {
        super(owner, modal);
    }

    protected DecDialog(Frame owner, String title) {
        super(owner, title);
    }

    protected DecDialog(Frame owner, String title, boolean modal) {
        super(owner, title, modal);
    }

    protected DecDialog(Frame owner, String title, boolean modal, GraphicsConfiguration gc) {
        super(owner, title, modal, gc);
    }

    protected DecDialog(Dialog owner) {
        super(owner);
    }

    protected DecDialog(Dialog owner, boolean modal) {
        super(owner, modal);
    }

    protected DecDialog(Dialog owner, String title) {
        super(owner, title);
    }

    protected DecDialog(Dialog owner, String title, boolean modal) {
        super(owner, title, modal);
    }

    protected DecDialog(Dialog owner, String title, boolean modal, GraphicsConfiguration gc) {
        super(owner, title, modal, gc);
    }

    protected DecDialog(Window owner) {
        super(owner);
    }

    protected DecDialog(Window owner, ModalityType modalityType) {
        super(owner, modalityType);
    }

    protected DecDialog(Window owner, String title) {
        super(owner, title);
    }

    protected DecDialog(Window owner, String title, ModalityType modalityType) {
        super(owner, title, modalityType);
    }

    protected DecDialog(Window owner, String title, ModalityType modalityType, GraphicsConfiguration gc) {
        super(owner, title, modalityType, gc);
    }

    protected void center(Frame owner) {
        Rectangle r = owner.getBounds();
        int x = r.x + (r.width - this.getSize().width)/2;
        int y = r.y + (r.height - this.getSize().height)/2;
        this.setLocation(x, y);
    }

}
